package com.ljq.cksp.pojo;

import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.annotation.Id;
import org.springframework.data.solr.core.mapping.Indexed;
import org.springframework.data.solr.core.mapping.SolrDocument;

import java.io.Serializable;

/**
 * @Author:ljq
 * @Date:2020/2/9
 */
@SolrDocument(solrCoreName = "law")
public class Law implements Serializable {
//    @Id
//    @Indexed
//    private String id;

    @Id
    @Indexed
    @Field
    private String title;
//    @Field
//    private String piece;
//    @Field
//    private String chapter;
//    @Field
//    private String part;
    @Indexed
    @Field
    private String content;

    public Law() {
    }

    public Law(String title, String content) {
        this.title = title;
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "Law{" +
                "title='" + title + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
